package com.ssm.gbq.dao;

import com.ssm.gbq.model.Doctor;
import gbq.ssm.utils.PageBounds;

import java.util.List;

public interface DoctorDao {
    /**
     * 分页查询
     * @param doctor
     * @param currentPage
     * @param pageSize
     * @return
     * @throws Exception
     */
    PageBounds<Doctor> openDoctorTable(String nameOrPhone, int currentPage, int pageSize)throws Exception;

    /**
     * 通过id查询
     * @param id
     * @return
     * @throws Exception
     */
    Doctor getDoctorById(Integer id)throws Exception;

    /**
     * 添加
     * @param doctor
     * @throws Exception
     */
    void addDoctor(Doctor doctor)throws Exception;

    /**
     * 修改
     * @param doctor
     */
    void updateDoctor(Doctor doctor)throws Exception;

    /**
     * 通过手机查询
     * @param nameOrPhone
     * @return
     * @throws Exception
     */
    List<Doctor> searchDoctor(String nameOrPhone)throws Exception;

    /**
     * 删除
     * @param ids
     * @throws Exception
     */
    void delDoctorById(List<Integer> ids)throws Exception;

    /**
     * 通过班级id查询
     * @param id
     * @return
     * @throws Exception
     */
    List<Doctor> getDoctorByDepartment(Integer id)throws Exception;

}
